﻿var ATT = (function (att) {
    data = {
        WorkflowId: '',
        WorktaskId: '',
        WorkflowInsId: '',
        WorktaskInsId: '',
        Status: ''
    };

    att.init = function (workFlowId, workTaskId, workFlowInsId, worktaskInsId,status) {
        data.WorkflowId = workFlowId;
        data.WorktaskId = workTaskId;
        data.WorkflowInsId = workFlowInsId;
        data.WorktaskInsId = worktaskInsId;
        data.Status = status;
    };
    att.setWorkflowInsId = function (workFlowInsId) {
        data.WorkflowInsId = workFlowInsId;
    };
    att.setWorktaskInsId = function (worktaskInsId) {
        data.WorktaskInsId = worktaskInsId;
    };
    att.setStatus = function (status) {
        data.Status = status;
    };

    att.setOperatorInsId = function (operatorInsId) {
        data.OperatorInsId = operatorInsId;
    };

    att.getOperatorInsId = function () {
        var strOperatorInsId = '';
        if (data) {
            strOperatorInsId = data.OperatorInsId;
        }
        return strOperatorInsId;
    };

    //流程ID
    att.getWorkflowId = function () {
        var strWorkflowId = '';
        if (data) {
            strWorkflowId = data.WorkflowId;
        }
        return strWorkflowId;
    };

    //流程任务ID
    att.getWorktaskId = function () {
        var strWorktaskId = '';
        if (data) {
            strWorktaskId = data.WorktaskId;
        }
        return strWorktaskId;
    };
    //流程实例ID
    att.getWorkflowInsId = function () {
        var strWorkflowInsId = '';
        if (data) {
            strWorkflowInsId = data.WorkflowInsId;
        }
        return strWorkflowInsId;
    };
    //流程任务实例ID
    att.getWorktaskInsId = function () {
        var strWorktaskInsId = '';
        if (data) {
            strWorktaskInsId = data.WorktaskInsId;
        }
        return strWorktaskInsId;
    };
    //流程状态
    att.getStatus = function () {
        var strStatus = '';
        if (data) {
            strStatus = data.Status;
        }
        return strStatus;
    };
    return att;
})(ATT || {});
